Goto

Collaborating Authors

 patch size


Toward an Optimal Configuration for Tree Species Classification from Bark Images: A Leakage-Safe Ablation Study

arXiv.org Artificial Intelligence

Identifying tree species from bark photographs matters for forest inventory and the wood-processing industry, yet the design choices behind deep-learning approaches have not been studied systematically, and some reported results may be inflated by images of the same trunk appearing in both training and test sets. We present a systematic ablation on BarkNet 1.0 (20 species) under a tree-level, leakage-safe five-fold cross-validation, using ConvNeXt-V2 backbones with attention-based multiple instance learning (AMIL). We vary patch size, aggregation strategy, training regime, backbone capacity, the whole-image baseline, and test-time bag size, and we measure leakage directly with a matched image-level split. Per-patch accuracy rises with patch size (75.2% at 160 px to 89.3% at 512 px), and image-level accuracy plateaus near 94.9% at 512 px. AMIL exceeds majority voting by at most 0.7 pp; soft voting and mean pooling do no better than hard voting, so the gain comes from the learned attention weights and vanishes at 512 px, where attention is near-uniform. Backbone capacity changes accuracy by less than a point, and two-stage training gives no advantage. Whole-image classification (91.9%) trails patch aggregation, and accuracy saturates around 64 patches per image. Under an image-level split, the same configuration reaches 99.9% (+5.0 pp) and the whole-image baseline 99.2% (+7.3 pp), an inflation as large as the entire effect of patch size that also erases the differences between design choices. We recommend patches as large as possible while leaving enough to aggregate (about 512 px here), a nano backbone, and tree-level splits for bark benchmarks.


Scratchpad Patching: Decoupling Compute from Patch Size in Byte-Level Language Models

arXiv.org Artificial Intelligence

Tokenizer-free language models eliminate the tokenizer step of the language modeling pipeline by operating directly on bytes; patch-based variants further aggregate contiguous byte spans into patches for efficiency. However, the average patch size chosen at the model design stage governs a tight trade-off: larger patches reduce compute and KV-cache footprint, but degrade modeling quality. We trace this trade-off to patch lag: until a patch is fully observed, byte predictions within it must rely on a stale representation from the previous patch to preserve causality; this lag widens as patches grow larger. We introduce Scratchpad Patching (SP), which inserts transient scratchpads inside each patch to aggregate the bytes seen so far and refresh patch-level context for subsequent predictions. SP triggers scratchpads using next-byte prediction entropy, selectively allocating compute to information-dense regions and enabling post-hoc adjustment of inference-time compute. Across experiments on natural language and code, SP improves model quality at the same patch size; for example, even at $16$ bytes per patch, SP-augmented models match or closely approach the byte-level baseline on downstream evaluations while using a $16\times$ smaller KV-cache over patches and requiring roughly $3$-$4\times$ less inference compute than the byte-level baseline.


FHRFormer: A Self-Supervised Masked Transformer Framework for Fetal Heart Rate Time-Series Inpainting and Forecasting

arXiv.org Artificial Intelligence

These authors contributed equally to this work. Abstract--Approximately 10% of newborns require assistance I. INTRODUCTION to initiate breathing at birth, and around 5% need ventilation support. Fetal heart rate (FHR) monitoring plays a crucial role Despite advances in perinatal care, approximately 10% of in assessing fetal well-being during prenatal care, enabling thenewborns require assistance to initiate breathing at birth, with detection of abnormal patterns and supporting timely obstetric 5% needing advanced ventilatory support (Dawes et al., 2021; interventions to mitigate fetal risks during labor. This persistent clinical challenge highlights artificial intelligence (AI) methods to analyze large datasets of continuous FHR monitoring episodes with diverse outcomesthe indispensable role of fetal well-being assessment during may offer novel insights into predicting the risk of needinglabor, where continuous fetal heart rate (FHR) monitoring breathing assistance or interventions. Recent advances in wearableis a pivotal tool for detecting neonatal complications (Urdal FHR monitors have enabled continuous fetal monitoring withoutet al., 2019; Nageotte, 2015). Such missing data limits the extractionproactively, mitigating the risk of neonatal deaths (Nageotte, of meaningful insights and complicates automated (AI-based) 2015; Alfirevic et al., 2017). In this paper, we propose a masked transformer-based autoencoder approach to reconstruct missingimpractical for many low-resource environments (Mwakawanga FHR signals by capturing both local temporal and frequencyet al., 2024). The proposed method demonstratesdevices, such as the Moyo FHR monitor, addresses this gap in robustness across varying durations of missing data and can beprenatal care by providing a portable, cost-effective solution that used for signal inpainting and forecasting.


Physical Evaluation of Naturalistic Adversarial Patches for Camera-Based Traffic-Sign Detection

arXiv.org Artificial Intelligence

This paper studies how well Naturalistic Adversarial Patches (NAPs) transfer to a physical traffic sign setting when the detector is trained on a customized dataset for an autonomous vehicle (AV) environment. We construct a composite dataset, CompGTSRB (which is customized dataset for AV environment), by pasting traffic sign instances from the German Traffic Sign Recognition Benchmark (GTSRB) onto undistorted backgrounds captured from the target platform. CompGTSRB is used to train a YOLOv5 model and generate patches using a Generative Adversarial Network (GAN) with latent space optimization, following existing NAP methods. We carried out a series of experiments on our Quanser QCar testbed utilizing the front CSI camera provided in QCar. Across configurations, NAPs reduce the detector's STOP class confidence. Different configurations include distance, patch sizes, and patch placement. These results along with a detailed step-by-step methodology indicate the utility of CompGTSRB dataset and the proposed systematic physical protocols for credible patch evaluation. The research further motivate researching the defenses that address localized patch corruption in embedded perception pipelines.


Now We Know? A Systematic Comparison of TerraMind and THOR

arXiv.org Artificial Intelligence

Benchmarks for Geospatial Foundation Models (GFMs) increasingly rank models by aggregate score, but such rankings obscure why models differ: how much of the gap is architecture, how much is decoder capacity, and how much is a use-case-specific artefact? This study addresses that gap through a controlled comparison of two GFMs developed under European Space Agency's $Φ$-lab with contrasting design philosophies: THOR, which introduces a compute-adaptive architecture supporting variable patch sizes and unifies Sentinel-1, -2, and -3 data at their native resolutions; and TerraMind, a multimodal generative GFM pretrained with a dual-scale token/pixel objective that enables any-to-any cross-modal generation (Thinking-in-Modalities) to infer missing sensors at inference time. Rather than reporting a single leaderboard, we investigate the axes along which the two architectures actually differ - patch size, decoder complexity, finetuning regime, input modality, and model scale - across ten use cases spanning segmentation and regression in diverse domains, including climate disaster response, methane leak detection, snow monitoring, or sea ice mapping. We find that architectural design choices - patch size and decoder type in particular - explain more performance variance than model identity itself, that the two models embody complementary investment strategies (pretraining-time scale for TerraMind versus inference-time tokenisation for THOR), and that correctly interpreting results requires dataset-level characterisation. The resulting picture is not a single winner but a set of hypotheses and a diagnostic ablation methodology that we expect to generalise to future GFMs beyond THOR and TerraMind.


Debiasing Central Fixation Confounds Reveals a Peripheral "Sweet Spot" for Human-like Scanpaths in Hard-Attention Vision

arXiv.org Artificial Intelligence

Human eye movements in visual recognition reflect a balance between foveal sampling and peripheral context. Task-driven hard-attention models for vision are often evaluated by how well their scanpaths match human gaze. However, common scanpath metrics can be strongly confounded by dataset-specific center bias, especially on object-centric datasets. Using Gaze-CIFAR-10, we show that a trivial center-fixation baseline achieves surprisingly strong scanpath scores, approaching many learned policies. This makes standard metrics optimistic and blurs the distinction between genuine behavioral alignment and mere central tendency. We then analyze a hard-attention classifier under constrained vision by sweeping foveal patch size and peripheral context, revealing a peripheral sweet spot: only a narrow range of sensory constraints yields scanpaths that are simultaneously (i) above the center baseline after debiasing and (ii) temporally human-like in movement statistics. To address center bias, we propose GCS (Gaze Consistency Score), a center-debiased composite metric augmented with movement similarity. GCS uncovers a robust sweet spot at medium patch size with both foveal and peripheral vision, that is not obvious from raw scanpath metrics or accuracy alone, and also highlights a "shortcut regime" when the field-of-view becomes too large. We discuss implications for evaluating active perception on object-centric datasets and for designing gaze benchmarks that better separate behavioral alignment from center bias.


Steal the Patch Size: Adversarially Manipulate Vision-Language Models

arXiv.org Artificial Intelligence

We present a black-box model-stealing attack that recovers private vision-tokenizer configurations of deployed vision-language models (VLMs), including the visual patch size and input preprocessing pipeline. The key idea is a task-level side channel induced by ViT-style patchification: when a synthetic grid image is aligned with the hidden patch grid, boundary cues are erased at tokenization, causing periodic accuracy drop. By sweeping the grid cell size and measuring these collapses, we infer the patch size; by introducing padding and a consistency-check test, we further identify whether preprocessing is dynamic- or fixed-resolution and recover the target resize resolution. Across open-source Qwen-VL variants and proprietary models including GPT and Claude, we reliably recover tokenizer-related parameters. Finally, we show that such leakage enables preprocessing-aware transfer attacks and model-targeted adversarial manipulation.


SHF: Symmetrical Hierarchical Forest with Pretrained Vision Transformer Encoder for High-Resolution Medical Segmentation

Neural Information Processing Systems

This paper presents a novel approach to addressing the long-sequence problem in high-resolution medical images for Vision Transformers (ViTs). Using smaller patches as tokens can enhance ViT performance, but quadratically increases computation and memory requirements. Therefore, the common practice for applying ViTs to high-resolution images is either to: (a) employ complex sub-quadratic attention schemes or (b) use large to medium-sized patches and rely on additional mechanisms within the model to capture the spatial hierarchy of details. We propose Symmetrical Hierarchical Forest (SHF), a lightweight approach that adaptively patches the input image to increase token information density and encode hierarchical spatial structures into the input embedding. We then apply a reverse depatching scheme to the output embeddings of the transformer encoder, eliminating the need for convolution-based decoders. Unlike previous methods that modify attention mechanisms or use a complex hierarchy of interacting models, SHFcan be retrofitted to any ViT model to allow it to learn the hierarchical structure of details in high-resolution images without requiring architectural changes. Experimental results demonstrate significant gains in computational efficiency and performance: on the PAIPWSI dataset, we achieved a 3 32 speedup or a 2.95% 7.03% increase in accuracy (measured by Dice score) at a 64K2 resolution with the same computational budget, compared to state-of-the-art production models. On the 3D medical datasets BTCV and KiTS, training was 6 faster, with accuracy gains of 6.93% and 5.9%, respectively, compared to models without SHF.


HEROFILTER: Adaptive Spectral Graph Filter for Varying Heterophilic Relations

Neural Information Processing Systems

Graph heterophily, where connected nodes have different labels, has attracted significant interest recently. Most existing works adopt a simplified approach using low-pass filters for homophilic graphs and high-pass filters for heterophilic graphs. However, we discover that the relationship between graph heterophily and spectral filters is more complex - the optimal filter response varies across frequency components and does not follow a strict monotonic correlation with heterophily degree. This finding challenges conventional fixed filter designs and suggests the need for adaptive filtering to preserve expressiveness in graph embeddings. Formally, natural questions arise: Given a heterophilic graph G, how and to what extent will the varying heterophily degree of G affect the performance of GNNs? How can we design adaptive filters to fit those varying heterophilic connections? Our theoretical analysis reveals that the average frequency response of GNNs and graph heterophily degree do not follow a strict monotonic correlation, necessitating adaptive graph filters to guarantee good generalization performance. Hence, we propose HEROFILTER, a simple yet powerful GNN, which extracts information across the heterophily spectrum and combines salient representations through adaptive mixing. HEROFILTER's superior performance achieves up to 9.2% accuracy improvement over leading baselines across homophilic and heterophilic graphs.